package com.ruoyi.abuwx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.abuwx.mapper.AbuwxPersonageRecordMapper;
import com.ruoyi.abuwx.domain.AbuwxPersonageRecord;
import com.ruoyi.abuwx.service.IAbuwxPersonageRecordService;

/**
 * 个人记录Service业务层处理
 * 
 * @author tang
 * @date 2022-07-02
 */
@Service
public class AbuwxPersonageRecordServiceImpl implements IAbuwxPersonageRecordService 
{
    @Autowired
    private AbuwxPersonageRecordMapper abuwxPersonageRecordMapper;

    /**
     * 查询个人记录
     * 
     * @param id 个人记录主键
     * @return 个人记录
     */
    @Override
    public AbuwxPersonageRecord selectAbuwxPersonageRecordById(Long id)
    {
        return abuwxPersonageRecordMapper.selectAbuwxPersonageRecordById(id);
    }

    /**
     * 查询个人记录列表
     * 
     * @param abuwxPersonageRecord 个人记录
     * @return 个人记录
     */
    @Override
    public List<AbuwxPersonageRecord> selectAbuwxPersonageRecordList(AbuwxPersonageRecord abuwxPersonageRecord)
    {
        return abuwxPersonageRecordMapper.selectAbuwxPersonageRecordList(abuwxPersonageRecord);
    }

    /**
     * 新增个人记录
     * 
     * @param abuwxPersonageRecord 个人记录
     * @return 结果
     */
    @Override
    public int insertAbuwxPersonageRecord(AbuwxPersonageRecord abuwxPersonageRecord)
    {
        abuwxPersonageRecord.setCreateTime(DateUtils.getNowDate());
        return abuwxPersonageRecordMapper.insertAbuwxPersonageRecord(abuwxPersonageRecord);
    }

    /**
     * 修改个人记录
     * 
     * @param abuwxPersonageRecord 个人记录
     * @return 结果
     */
    @Override
    public int updateAbuwxPersonageRecord(AbuwxPersonageRecord abuwxPersonageRecord)
    {
        abuwxPersonageRecord.setUpdateTime(DateUtils.getNowDate());
        return abuwxPersonageRecordMapper.updateAbuwxPersonageRecord(abuwxPersonageRecord);
    }

    /**
     * 批量删除个人记录
     * 
     * @param ids 需要删除的个人记录主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxPersonageRecordByIds(Long[] ids)
    {
        return abuwxPersonageRecordMapper.deleteAbuwxPersonageRecordByIds(ids);
    }

    /**
     * 删除个人记录信息
     * 
     * @param id 个人记录主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxPersonageRecordById(Long id)
    {
        return abuwxPersonageRecordMapper.deleteAbuwxPersonageRecordById(id);
    }
}
